<app-content-header></app-content-header>
<div class="cil__base-block cil_new_base-block">
  <img class="cil__top-image" src="assets/images/centaur/change.svg" />
  <ng-container>
    <label class="cil_batch_content cil_batch_label">{{ 'SELECT.BATHCH.LEVEL' |i18n }}</label>
    <nz-select class="cil_batch_content" [(ngModel)]="level">
      <nz-option *ngFor="let item of levelOptions" 
      [nzLabel]="item.label | i18n" 
      [nzValue]="item.value"
      >
      </nz-option>
    </nz-select>
  </ng-container>
      <!-- (nzChange)="handleChange($event)" -->

  <div class="cil_file_upload" *ngIf="level">
    <div class="cil_file_drag">
      <nz-upload 
      nzType="drag" 
      [nzMultiple]="false" 
      [nzCustomRequest]="customReq"
      [nzAccept]="'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel'"
      >
        <div class="cil_upload_svg">
          <div class="cil_drag_tips">{{ 'BATCH.IMPORT.DRAG.FILE' | i18n }}</div>
          <div class="cil_svg_outline">
            <img src="../../../../assets/images/upload.png" alt="">
          </div>
        </div>
      </nz-upload>
    </div>
    <div class="cil_upload_operation">
      <button nz-button class="cil_button_upload" (click)="handleFileUploadBook()"><span>{{ 'BATCH.IMPORT.LOCAL.UPLOAD' | i18n}}</span></button>
        <input type="file"  #fileUploadBook style="display: none;" accept=".xls,.xlsx"
         >
    </div>
    <div class="cil_upload_before">{{ 'BATCH.BERFORE.UPLOAD' |i18n }}</div>
    <div class="cil_upload_tips"><span class="required">*</span><span>{{'BATCH.IMPORT.OPTIONS.TIPS' | i18n}}</span>
    </div>
  </div>
</div>

<app-detail-header [title]="'TASK.HISTORY_RECORD' | i18n" [ifEditable]="false"></app-detail-header>
<div class="cil-table-block">
  <st #st
    [scroll]="scroll" 
    [data]="data"
    [columns]="columns" 
    [widthMode]="widthMode" 
    [ps]="ps" 
    [pi]="pi"
    [page]="stPage" 
    [total]="total" 
    [loading]="loading" 
    (change)="onChange($event)"
    >
    <ng-template st-row="result" let-item>
      <span>{{ BatchStatusTextMap[item.status] | i18n}}</span>
    </ng-template>
  </st>
</div>
